﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Dazaza.UI.Mvc.Models;
using Dazaza.Domain.Model;
using Dazaza.Domain.Model.SearchInfo;
using Dazaza.Repositories;

namespace Dazaza.UI.Mvc.Controllers
{
    public class UserController : BaseController
    {
        public ActionResult Index(int? pageindex,string userName)
        {
            string queryPageIndex = Request.QueryString["pageindex"] ?? string.Empty;

            if (string.IsNullOrEmpty(userName))
            {
                Redirect("/Message/Index?code=500");
            }

            UserIndexViewModel model = new UserIndexViewModel(masterViewModel);

            // searchInfo
            InfoSearchInfo searchInfo = new InfoSearchInfo()
            {
                PageIndex = pageindex ?? 1,
                PageSize = this.masterViewModel.PagerInfo.PageSize,
                Name=userName
            };

            return View();
        }

    }
}
